//package com.study.config;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.scheduling.TaskScheduler;
//import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
//import org.springframework.web.servlet.config.annotation.EnableWebMvc;
//import org.springframework.web.socket.config.annotation.EnableWebSocket;
//import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
//import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
//import org.springframework.web.socket.handler.BinaryWebSocketHandler;
//
///**
// * @author zhuzi
// * 2024/6/13 15:47
// */
//@Configuration
//@EnableWebMvc
//@EnableWebSocket
//public class WebSocketConfig implements WebSocketConfigurer {
//    @Override
//    public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
//        registry.addHandler(myHandler(), "/ws"); // 'myHandler' 是您的WebSocket处理器
//    }
//
//    @Bean
//    public BinaryWebSocketHandler myHandler() {
//        return new BinaryWebSocketHandler();
//    }
//
//    @Bean
//    public TaskScheduler taskScheduler() {
//        ThreadPoolTaskScheduler scheduling = new ThreadPoolTaskScheduler();
//        scheduling.setPoolSize(10);
//        scheduling.initialize();
//        return scheduling;
//    }
//}
